package com.axxc.jpa.pattendegign.singleton;

import com.axxc.jpa.pattendegign.commons.C;

public class SingleD implements C {
	private static class SingletonHolder {
		private static final SingleD INSTANCE = new SingleD();
	}

	private SingleD() {
	}

	/**
	 * 静态内部类登记式显示调用,延迟加载,线程安全
	 * 
	 * @return
	 */
	public static final SingleD getInstance() {
		return SingletonHolder.INSTANCE;// 静态内部类
	}

	@Override
	public void show() {
		System.out.println(Thread.currentThread().getName() + "静态内部类登记式" + this.toString());
	}
}